package com.lock.immersive.utils;

public enum ErrorCode {

    SUCCESS(200, "ok"),
    PARAMS_ERROR(40000, "请求参数错误"),
    NOT_LOGIN_ERROR(40100, "未登录"),
    NO_AUTH_ERROR(40101, "无权限"),
    REGISTERED_ERROR(40102, "该账户已注册"),
    NOT_FOUND_ERROR(40400, "请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    SYSTEM_ERROR(50000, "系统内部异常"),
    OPERATION_ERROR(50001, "操作失败"),
    CREATE_COUPON_ERROR(50002, "创建优惠券失败"),
    INSERT_ERROR(50003, "添加失败"),
    CODE_INVALID(50004, "验证码已失效"),
    CODE_ERROR(50005, "验证码错误"),
    REGISTRATION_FAILED(50006, "注册失败"),
    UPDATE_ERROR(50007,"更新失败"),
    ACCOUNT_OR_PASSWORD_INCORRECT(500008,"账号或者密码不正确"),
    CANNOT_JOIN(50009,"此阶段不能进团"),
    DONNOT_REPEAT(50010,"您已付款，请勿重复下单"),
    PLEASE_WAIT(50011,"未到付款时间，请耐心等待"),
    INVALID_ADDRESS(50012,"无效地址"),
    DONNOT_HAVE_COUPON(50013,"您没有该优惠券"),
    COUPON_BEEN_USED(50014,"优惠券已被使用"),
    TUAN_CANNOT_USE(50015,"当前团不可使用"),
    COUPON_TIME_CANNOT_USE(50016,"优惠券不在使用时间范围内"),
    COUPON_CONDITION_CANNOT_USE(50017,"未达到优惠券使用条件"),
    NON_PAYMENT(50018,"未支付"),

    ;
    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
